﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="QuestionAdd.aspx.cs" Inherits="ProjectSem40701.Admin.QuestionAdd" ValidateRequest="false" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<%@ Register assembly="Telerik.Web.UI, Version=2009.1.311.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" namespace="Telerik.Web.UI" tagprefix="telerik" %>


<asp:Content ID="Content1" ContentPlaceHolderID="title" runat="server">
    <title>Thêm mới câu hỏi</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    
    <li><a href="Question.aspx" class="report">Danh sách câu hỏi</a></li>
    
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <!--
        set tab active here
     -->
    <script type="text/javascript" language="javascript">
        setTab(document.getElementById("6"));
    </script>
    <!--
        end set tab active
     -->
     <div id="box">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>      
        <h3>Thêm mới câu hỏi</h3>
        <fieldset class="fieldset">
            <legend>
                Thông tin câu hỏi
            </legend>
            <p>
                <label>Môn:</label>
                <asp:DropDownList ID="cbbSubjectID" runat="server" 
                    DataSourceID="ObjectDataSource1" DataTextField="SubjectName" 
                    DataValueField="SubjectID">
                </asp:DropDownList>
                <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                    OldValuesParameterFormatString="original_{0}" 
                    SelectMethod="Get_tbl_Subject_Select_All" 
                    TypeName="ProjectSem40701.Admin.AdminXSD.SubjectTableAdapters.tbl_SubjectTableAdapter">
                </asp:ObjectDataSource>
            </p>
            <p>
                <label>Tiêu đề:</label>
            <asp:TextBox ID="txtTitle" runat="server" Width="200px"></asp:TextBox>            
            </p>
                <label>Nội dung câu hỏi:</label>
                <fckeditorv2:fckeditor ID="txtQuestionContent" runat="server" BasePath="../fck/" 
                Height="350px" Width="550px">
            </fckeditorv2:fckeditor>     

            <label>Mô tả:</label>
                <asp:TextBox ID="txtQuestionDescription" runat="server" Width="150px"></asp:TextBox>             
            <p>
                <label>Mức độ khó:</label>
                <asp:DropDownList ID="cbbQuestionLevelID" runat="server" Width="158px" 
                    DataSourceID="ObjectDataSource2" DataTextField="QuestionLevelName" 
                    DataValueField="QuestionLevelID">
                
                </asp:DropDownList>
                <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" 
                    OldValuesParameterFormatString="original_{0}" 
                    SelectMethod="Get_tbl_QuestionLevel_Select_All" 
                    
                    TypeName="ProjectSem40701.Admin.AdminXSD.QuestionLevelTableAdapters.tbl_QuestionLevelTableAdapter">
                </asp:ObjectDataSource>
            </p>   
            <p>
                <label>Điểm cho câu hỏi:</label>
                <asp:TextBox ID="txtQuestionMark" runat="server" Width="150px"></asp:TextBox>
            </p>   
            <p>
                <label>Trạng thái:</label>
                <asp:DropDownList ID="cbbStatus" runat="server" Width="158px">
                    <asp:ListItem Value="1">Hoạt động</asp:ListItem>
                    <asp:ListItem Value="0">Khóa</asp:ListItem>
                </asp:DropDownList>
            </p>             
            </fieldset>
                   
        <div align="center">
            <asp:Button ID="btnAdd" runat="server" Text="Thêm mới" CssClass="button" 
                onclick="btnAdd_Click" />
            <cc1:ConfirmButtonExtender ID="btnAdd_ConfirmButtonExtender" runat="server" 
                ConfirmText="Bạn có thực sự muốn thêm mới câu hỏi này?" Enabled="True" TargetControlID="btnAdd">
            </cc1:ConfirmButtonExtender>
        </div>
        
        <%-- Thông báo thành công hay thất bại ở đây --%>
        
        <cc1:ModalPopupExtender ID="btnAdd_ModalPopupExtender" runat="server" 
                DynamicServicePath="" Enabled="False" TargetControlID="btnAdd" 
                BackgroundCssClass="modalBackground"
                PopupControlID="pnlPopup" >
        </cc1:ModalPopupExtender>

        <asp:Panel ID="pnlPopup" runat="server" CssClass="confirm-dialog" style="display:none;">
            <div class="inner">
                <h2>
                    <asp:Literal ID="ltrMessage" runat="server"></asp:Literal>
                </h2>
                <div class="base">
                    <asp:Label ID="lblSuccess" runat="server" Text="" Visible="false"></asp:Label></br><br />
                    <asp:Button ID="btnYes" onclick="btnYes_Click" runat="server" Text="Yes" Font-Bold="False" />                            
                    <asp:LinkButton ID="LinkButton1" runat="server" CssClass="close" OnClick="btnClose_Click"
                        OnClientClick="$find('mdlPopup').hide(); return false;" />
                </div>
            </div>
        </asp:Panel>
        
    </div>
</asp:Content>